package com.ruima.study.jdk21.nine.demo1;

import java.util.List;
import java.util.stream.Stream;

/**
 * <p>
 * <p></p>
 * <p>
 * <p>Copyright (c) 2024-10-10 09:51 , 马锐个人 All Rights Reserve</p>
 *
 * @author marui
 * @version [V1.0]
 */
public class Demo {
    public static void main(String[] args) {
        // iterate无限流增强
        List<Integer> list = Stream.iterate(1, i -> i < 20, i -> i + 1).toList();
    }
}
